@import "../assets/iconfont/iconfont.css";
@import "../style.less";

body {
	background-color: #EEE;
}

.loading-box {
	text-align: center;
}

.group-dialog {
	.new {
		.md-field {
			margin: 0;
			padding-top: 0;
			min-height: 32px;

			&,
			&.md-focused {
				label {
					top: 6px;
				}
			}
		}
	}
}

.group-item {
	.md-card-content {
		padding-left: 0;
		padding-right: 0;
		padding-bottom: 0;
	}

	.md-card-header {
		>* {
			vertical-align: middle;
		}

		.md-title {
			margin-top: 0;
			display: inline-block;
			width: calc(100% - 90px);
		}
	}

	.md-table-cell {
		font-size: 15px;
		line-height: 30px;
	}

	.cell-batch {
		width: 70px;
		display: none;

		.md-table-head-label,
		.md-table-cell-container {
			padding-right: 16px;
		}

		.md-checkbox {
			margin: 0;
		}
	}

	.cell-enable {
		width: 80px;
	}

	.cell-type {
		width: 270px;
	}

	.cell-action {
		width: 600px;
	}

	.cell-action .md-button {
		margin-top: 0;
		margin-bottom: 0;
	}
}

body.batch-on .group-item .cell-batch {
	display: table-cell;
}

.rule-drag-view {
	display: flex;
	flex-direction: column;
	max-height: 100vh;
	.md-card-content,
	.md-card-area {
		display: flex;
		flex-direction: column;
		overflow: hidden;
		padding-block-end: 0;
	}
	p, pre {
		margin-block-start: 0;
	}
	pre {
		overflow: auto;
	}
}

.float-button {
	position: fixed;
	right: 20px;
	bottom: 20px;
	width: 56px;
	z-index: 2;

	.md-speed-dial {
		position: relative;
		bottom: 0;
		right: 0;
		&:not(.md-active) .md-speed-dial-content {
			max-height: 0;
		}
	}
	.md-button {
		margin: 0;
		margin-top: 15px;
	}
}

.form-group>* {
	padding-top: 10px;
	padding-bottom: 10px;
	font-size: 16px;
	display: inline-block;
	vertical-align: middle;
}

#edit-page {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 10;
	background-color: #EEE;

	.md-gutter {
		padding: 20px;
		height: calc(100% - 64px);
		overflow: auto;
	}

	.form-group {
		>* {
			padding-top: 10px;
			padding-bottom: 10px;
			font-size: 16px;
			display: inline-block;
			vertical-align: middle;
		}

		.left {
			width: 10%;
			min-width: 160px;
		}

		.right {
			width: 89%;
			max-width: calc(100% - 190px);

			.mdl-radio {
				margin-right: 10px;
			}
		}
	}

	.edit-right {
		.md-card {
			margin-bottom: 20px;
		}

		.group {
			margin: 0;

			span,
			.md-button {
				vertical-align: middle;
				margin-right: 8px;
			}
		}
	}
}

.main-menu>.md-content {
	height: auto !important;
	background-color: #EEE !important;
}

.download-input {
	>* {
		vertical-align: middle;
	}

	.url {
		display: inline-flex;
		width: calc(100% - 110px);
		margin: 0;
		padding-top: 0;
		min-height: 32px;

		&,
		&.md-focused {
			label {
				top: 6px;
			}
		}
	}
}

.download-list {
	.md-list-item-content {
		padding-left: 4px;
		padding-right: 6px;
		.md-list-action {
			margin-right: 0;
			margin-left: 0;
		}
	}
}

.import-confirm {
	.md-card-content {
		padding-left: 0;
		padding-right: 0;
		padding-bottom: 0;
	}

	.import-table {
		.cell-group {

			span,
			.md-button {
				vertical-align: middle;
			}
		}
	}

	.save-to {
		display: inline-block;
		padding-left: 18px;

		span {
			margin-right: 10px;
		}

		>* {
			height: 36px;
			line-height: 36px;
			vertical-align: middle;
			margin: 0;
		}

		.md-radio-container {
			margin-top: 8px;
		}

		.md-radio .md-radio-label {
			height: 36px;
			line-height: 36px;
			padding-left: 8px;
			padding-right: 8px;

			>* {
				vertical-align: middle;
			}
		}
	}
}

.group-dialog {
	max-width: 400px;
	width: 80%;
	.md-dialog-content {
		padding-left: 5px;
		padding-right: 5px;
	}
}

.cloud-dialog {
	max-width: 768px;
	width: 80%;
}

.md-menu-content {
	z-index: 11;
}


@media (max-width: 960px) {
	.group-item {
		.md-table-cell .md-table-cell-container,
		.md-table-cell:last-child .md-table-cell-container {
			padding-left: 6px;
			padding-right: 6px;
		}

		.cell-type {
			display: none;
		}
		
		.cell-action {
			width: 160px;

			.md-button {
				min-width: auto;
				margin: 0;
				.md-ripple {
					padding-left: 2px;
					padding-right: 2px;
				}
			}
			.view-button,
			span {
				display: none;
			}
		}
	}

	#edit-page .edit-right {
		padding-top: 20px;
	}
	
	.save-to {
		.md-radio {
			display: flex;
		}
	}
}